package cn.wolfcode.wms.mapper;

import cn.wolfcode.wms.domain.Department;
import cn.wolfcode.wms.domain.Role;
import cn.wolfcode.wms.qo.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RoleMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Role record);

    Role selectByPrimaryKey(Long id);

    List<Role> selectAll();

    int updateByPrimaryKey(Role record);

    int rows (QueryObject qo);

    List<Department> queryForList (QueryObject qo);

    void deleteRelation(Long id);

    void insertRelation(@Param("roleId") Long id,@Param("permissionId") Long permissId);

    void deleteRelationMenu(Long id);

    void insertRelationMenu(@Param("roleId")Long id, @Param("menuId")Long menuId);
}